//
//  Sender.m
//  NetImager
//
//  Created by li hongliang on 10-9-6.
//  Copyright 2010 sweet-home. All rights reserved.
//

#import "Sender.h"
#import "SenderViewDelegate.h"

@implementation Sender

@synthesize senderSetting=_senderSetting;
@synthesize delegate;

- (id) initWithSite: (NSString *)siteKeyStr delegate:(id)target
{
	if(self = [super init])
	{
		[self.senderSetting release];
		self.senderSetting = [[UserSetting alloc] init] ;
		[self.senderSetting loadUserSetting:siteKeyStr];
		if([target conformsToProtocol:@protocol(SenderViewDelegate)]) {
			self.delegate = target;
		}
		else {
			self.delegate = nil;
		}
		return self;		
	}
	return NULL;
}

- (void)dealloc {
	[self.senderSetting release];
    [super dealloc];
}

@end
